#include <iostream>
using namespace std;
//static int _year = 2021;
// void Print()
// {
//     cout << "Hello World!\n" << endl;
//     cout << "_year: " << _year << endl;
// }

class Time
{
    friend void Sum(const Time& t );
    public:
        Time()
        {
            _year = 2021;
        }
        Time(int year)
        : _year (year)
        {
            //cout << "Constructor with parameters called!" << endl;


        }
    private:
        //static int _year1;
        int _year = 2021;
};
class Test 
{
    friend void Sum(const Time& t );
    friend class Time;
    public:
    Test()
    : _hours(12),
    _ref(_hours),
    _t()
      //_minutes(),
      //_seconds()
        {
            //cout << "Constructor called!" << endl;
        }
        Test(int hours, int minutes, int seconds, int & ref)
        : _hours(hours),
          _minutes(minutes),
          _seconds(seconds),
            _ref(ref),
            _t(2023)

        {
            //cout << "Constructor with parameters called!" << endl;

    }
        void print(){
            cout << "Hello World!\n" << endl;
            cout << "Hours: " << _hours << endl;
            cout << "Minutes: " << _minutes << endl;
            cout << "Seconds: " << _seconds << endl;
            cout << "Const: " << _const << endl;
            cout << "Ref: " << _ref << endl;
            //cout << "Time: " << _t._year << endl;
        }
    private:
        int _hours;
        int _minutes = 6;
        int _seconds = 10;
        int & _ref ;
        const int _const  = 5;
        Time _t;
};
void Sum(const Time& t)
{
    cout << "Hello World!\n" << endl;
    cout << "Year: " << t._year << endl;
}